package Wagons is

   ContenuSalle : Positive := 60;
   Taille_Compartiment : Positive := 8;
   type Type_Wagon is (Salle , Compartiment);
   type Wagon(Model: Type_Wagon) is tagged private;
   --   type P_Wagon is access Wagon'Class;

   function Contenance (W :Wagon ) return Positive;
   function Saisir return Wagon;
   procedure Afficher( W: Wagon) ;


private

   type Wagon(Model : Type_Wagon) is tagged record
      case Model is
         when Salle => null;
            -- Next : P_Wagon;
         when Compartiment =>
            -- Next : P_Wagon;
            Nb_Compart : Positive;
      end case;

   end record;

end Wagons;
